//
//  FoodTherapyCell.m
//  project_delicious
//
//  Created by dlios on 15-3-23.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "FoodTherapyCell.h"

@implementation FoodTherapyCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.picImageView];
        [_picImageView release];
        
        self.mainLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.mainLabel];
        [_mainLabel release];
        
        self.detailLabel = [[UILabel alloc] init];
        [self.contentView addSubview:_detailLabel];
        [_detailLabel release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat widths = self.frame.size.width;
    CGFloat heights = self.frame.size.height;
    
    self.picImageView.frame = CGRectMake(5, 5, widths / 5, heights-10);
    self.mainLabel.frame = CGRectMake(widths / 5 + 20, heights / 4, widths / 2, heights / 3);
    self.detailLabel.frame = CGRectMake(widths / 5 + 20, heights / 2+5, widths / 2, heights / 5);
    self.detailLabel.font = [UIFont systemFontOfSize:10];
    

}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
